package leetcodecompetition.S111;

/**
 * @Author: Siantar
 * @Date: 2023-08-19-22:38
 * @Description: 1.0
 */
public class T8014 {
    public boolean canMakeSubsequence(String str1, String str2) {
        int m = str1.length(), n = str2.length();
        int a = 0, b = 0;
        while (a < m && b < n) {
            System.out.println(str1.charAt(a) + " " + str2.charAt(b));
            if (str1.charAt(a) == str2.charAt(b) || str1.charAt(a) + 1 == str2.charAt(b) || str1.charAt(a) == 'z' && str2.charAt(b) == 'a') {
                b++;
            }
            a++;
        }
        return b == n;
    }


}
